<script setup lang="ts">
import store from '../store/index';

defineProps<{ msg: string }>()

fetch('/api/getUsers').then(resp=>resp.json()).then(data=>{
  console.log(data);
})
console.log(store.state.counter)
</script>

<template>
  <h1>{{ msg }}</h1>
  <el-button @click="store.commit('add')">{{store.state.counter}}</el-button>
</template>
